#include "image.h"

Image::Image()
{

}

int Image::getImage_id() const
{
    return image_id;
}

void Image::setImage_id(int value)
{
    image_id = value;
}

int Image::getUser_id() const
{
    return user_id;
}

void Image::setUser_id(int value)
{
    user_id = value;
}

QString Image::getImage_path() const
{
    return image_path;
}

void Image::setImage_path(const QString &value)
{
    image_path = value;
}

QString Image::getImage_name() const
{
    return image_name;
}

void Image::setImage_name(const QString &value)
{
    image_name = value;
}

int Image::getImage_size() const
{
    return image_size;
}

void Image::setImage_size(int value)
{
    image_size = value;
}

QString Image::getImage_time() const
{
    return image_time;
}

void Image::setImage_time(const QString &value)
{
    image_time = value;
}

QDate Image::extractDateFromName() const
{
    QString ImageName=getImage_name();
    QString dateStr=ImageName.left(10);
    return QDate::fromString(dateStr, "yyyy-MM-dd");
}
